//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#ifndef Green_ArchInfoGPGPU_H
#define Green_ArchInfoGPGPU_H

#include "ArchInfoBase.h"

namespace Green {

  /*!
    \class ArchInfoGPGPU
    \brief ArchInfo object for GPGPU architecture
  */

  class ArchInfoGPGPU : public ArchInfoBase {
  public:
    explicit ArchInfoGPGPU(const std::string& name); //!< Constructor
    std::list<EVmRegimeType> VmRegimeTypes() const override; //!< Return all applicable virtual memory regime types.
    ~ArchInfoGPGPU() { } //!< Destructor.
    void Setup() override; //!< Setup necessary details GPGPU architecture details for the ArchInfo object.
    uint32 ElfMachineType() const override { return 0xF3; } //!< Return GPGPU ELF machine type.
    const char* DefaultConfigFile() const override { return "config/pb100_gpu__rv64.config"; } //!< Return the default config file name.
    PhysicalPageManager* InstantiatePhysicalPageManager(EMemBankType bankType, MemoryTraitsManager* pMemTraitsManager) const override; //!< Instantiate a GPGPU architecture PhysicalPageManager object.
    MemoryTraitsRegistry* InstantiateMemoryTraitsRegistry() const override; //!< Instantiate a GPGPU architecture MemoryTraitsRegistry object.
  protected:
    Generator* InstantiateGenerator() const override; //!< Instantiate a GPGPU architecture Generator object.
    VmManager* InstantiateVmManager() const override; //!< Instantiate a GPGPU architecture VmManager object.
    GenAgent* InstantiateGenAgent(EGenAgentType agentType) const override; //!< Instantiate a GenAgent object based on the ArchInfo type and the passed in agent-type parameter.
    BootOrder* InstantiateBootOrder() const override;  //<! Instantiate a GPGPU architecture BootOrder object.
    RegisterFile* InstantiateRegisterFile() const override; //!< Instantiate a GPGPU architecture RegisterFile.
    ExceptionRecordManager* InstantiateExceptionRecordManager() const override; //!< Instantiate a GPGPU architecture exception records object.
    GenConditionSet* InstantiateGenConditionSet() const override; //!< Instantiate a GPGPU architecture GenConditionSet object.
    PageRequestRegulator* InstantiatePageRequestRegulator() const override; //!< Instantiate a GPGPU architecture PageRequestRegulator object.
    AddressFilteringRegulator* InstantiateAddressFilteringRegulator() const override; //!< Instantiate a GPGPU architecture AddressFilteringRegulator object.
    AddressTableManager* InstantiateAddressTableManager() const override; //!< Instantiate a AddressTableManager object based on the ArchInfo type.
    AddressSolutionFilter* InstantiateAddressSolutionFilter(EAddressSolutionFilterType filterType) const override; //!< Instantiate a AddressSolutionFilter object based on the ArchInfo type and the passed in filterType parameter.
 private:
  };

}

#endif
